package com.simple.javatraining.testing.shuffler;

import java.util.*;

import com.simple.javatraining.testing.testinside.answers.ProposedAnswer;
import com.simple.javatraining.testing.testinside.questions.Question;

public class Shuffler {

public void shuffleData(List<Question> allQuestions) {
    shuffleQuestions(allQuestions);
    for(Question currentQuestion:allQuestions) {
        List<ProposedAnswer> variantsOfAnswer = currentQuestion.getVariantsOfAnswer();
        shuffleVariantsOfAnswer(variantsOfAnswer);
}
}

public void shuffleQuestions(List<Question> allQuestions) {
    Collections.shuffle(allQuestions);
}

public void shuffleVariantsOfAnswer(List<ProposedAnswer> variantsOfAnswer) {
    Collections.shuffle(variantsOfAnswer);
}
}
